package top.itlir.edc.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import top.itlir.edc.domain.Courier;

public interface CourierRepository extends JpaRepository<Courier, Integer>, JpaSpecificationExecutor<Courier> {

	@Query("update Courier set deltag = '1' where id = ?")
	@Modifying
	void updateDeltag(Integer id);

	
	@Query("update Courier set deltag = '0' where id = ?")
	@Modifying
	void restoreDeltag(Integer id);

	@Query("from Courier where deltag = '0'")
	List<Courier> listajax();



}
